<?php
/**
 * Created by PhpStorm.
 * User: ysj
 * Date: 2022/4/20
 * Time: 16:53
 */

namespace App\Exports;


use Maatwebsite\Excel\Concerns\ToCollection;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\WithCalculatedFormulas;

class CompanyUserImport implements ToCollection,WithCalculatedFormulas
{
    /**
     * 使用 ToCollection
     * @param array $row
     *
     * @return User|null
     */
    public function collection(Collection $rows)
    {
        foreach ($rows as $row)
        {
            //dump($row);
            // 处理数据


        }
        //CompanyUserModelDB::insert($data);
    }

    public function createData($rows)
    {
        //todo
    }
}
